package top.drinyeit.nongmao.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import top.drinyeit.nongmao.R;

/**
 * Created by Administrator on 2017/12/8.
 */

public class HomeClassfyGridAdapter extends BaseAdapter {

    private Context context;
    private LayoutInflater mInflater;

    public HomeClassfyGridAdapter(Context context) {
        this.context = context;
        mInflater = LayoutInflater.from(context);
    }

    @Override
    public int getCount() {
        return 20;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder0 viewHolder0=null;
        if (convertView==null) {
            viewHolder0=new ViewHolder0();
            convertView = mInflater.inflate(R.layout.item_home_classfy_child, null);
            viewHolder0.tv_item_home_classfy_price = convertView.findViewById(R.id.tv_item_home_classfy_price);
            viewHolder0.tv_item_home_classfy_name = convertView.findViewById(R.id.tv_item_home_classfy_name);
            viewHolder0.iv_item_home_classfy_gv = convertView.findViewById(R.id.iv_item_home_classfy_gv);
            convertView.setTag(viewHolder0);
        }else{
            viewHolder0= (ViewHolder0) convertView.getTag();
        }

//        viewHolder0.
        return convertView;
    }


    private class ViewHolder0 {
        TextView tv_item_home_classfy_price;
        TextView tv_item_home_classfy_name;

        ImageView iv_item_home_classfy_gv;
    }

}
